package com.homework.demo2;

import java.util.HashSet;

public class SchoolClass {

    private HashSet<Student> students;

    public HashSet<Student> getStudents() {
        return students;
    }

    public SchoolClass() {
        this.students = new HashSet<Student>();
    }

    public void addStudent(Student student){
        students.add(student);
    }

    public void removeStudent(String name){
        students.removeIf(student -> student.getName().equals(name));
    }
}
